


//添加地址
 $(".addbtn-add").click(function () {
            //获取用户id
            var customerId =  $(".customerid").val();
            //获取表单中据
            console.log("submit点击之后");

            var addressName = $(".address_name").val();
            var addressCust = $(".address_cust").val();
            var addressProvince = $("#s_province").val();
            var addressCity = $("#s_city").val();
            var addressArea = $("#s_county").val();
            var addressDetails = $(".address_desc").val();
            var addressPhone = $(".address_phone").val();
            // console.log("用户id："+);


            $.ajax({
                type:"POST",
                url:"/fresh/address/add",
                dataType:"json",
                data:{
                    "customerId":customerId,
                    "addressName":addressName,
                    "addressCust":addressCust,
                    "addressProvince":addressProvince,
                    "addressCity":addressCity,
                    "addressArea":addressArea,
                    "addressDetails":addressDetails,
                    "addressPhone":addressPhone
                },
                success:function (result) {
                    console.log("result"+result);

                    if (result.status==1){
                        console.log("添加成功");
                        window.location.href="/fresh/address/detail.jsp"
                    }else {
                        console.log("添加失败");
                    }
                }


            })


        })







